package com.sixuerain.heartkey.dao;

import java.util.ArrayList;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.sixuerain.heartkey.app.HeartkeyApplication;
import com.sixuerain.heartkey.data.ILectionDBHelper;
import com.sixuerain.heartkey.data.LectionText;
import com.sixuerain.heartkey.db.helper.DatabaseHelper;

public class LectionDatabase implements ILectionDBHelper {
	private static final String TAG = "LectionDatabase";

	private static DatabaseHelper mOpenHelper = null;

	public  LectionDatabase() {
		Log.d(TAG, "contruct LectionDatabase.");
		mOpenHelper = HeartkeyApplication.mHearykeyDb;
	}
	

	public static SQLiteDatabase getDb(boolean writeable) {
		if (writeable) {
			return mOpenHelper.getWritableDatabase();
		} else {
			return mOpenHelper.getReadableDatabase();
		}
	}

	public void close() {
		mOpenHelper.close();
	}
	
	//interface
	public boolean Init()
	{
		Log.d(TAG,"Init");
		return true;
		}
	public boolean GetTotalList(ArrayList<LectionText> itemlist)
	{
		Log.d(TAG,"GetTotalList");
		return true;
	}
	public int GetTotalNum()
	{	
		Log.d(TAG,"GetTotalNum");
		return 0;
		}
	public boolean Get(LectionText item)
	{	
		Log.d(TAG,"Get");
		return true;
		}
	public boolean Add(LectionText item)
	{	
		Log.d(TAG,"Add");
		return true;
		}
	public boolean Delete(LectionText item)
	{	
		Log.d(TAG,"Delete");
		return true;
		}
}
